#include "trap.h"
   .set noat
   .globl main
   .text
main:
    li $t0, 0x00000000
    li $t1, 0x00000000
    li $s2, 0x00000000
    add $s0,$t0,$t1
    bne $s0,$s2,BAD_TRAP

    li $t0, 0x00000001
    li $t1, 0x00000010
    li $s2, 0x00000011
    add $s0,$t0,$t1
    bne $s2,$s0,BAD_TRAP

    li $t0, 0x00000001
    li $t1, 0x00000010
    li $s2, 0x00000011
    add $s0,$t0,$t1
    bne $s0,$s2,BAD_TRAP

    li $t0, 0x000f0001
    li $t1, 0x00010010
    li $s2, 0x00100011
    add $s0,$t0,$t1
    bne $s0,$s2,BAD_TRAP

    li $t0, 0x0480ff04
    li $t1, 0x40933204
    li $s2, 0x45143108
    add $s0,$t0,$t1
    bne $s0,$s2,BAD_TRAP

    li $t0, 0x2a19dd40
    li $t1, 0xa87971e0
    li $s2, 0xd2934f20
    add $s0,$t0,$t1
    bne $s0,$s2,BAD_TRAP

    li $t0, 0x00001234
    li $s2, 0x00002468
    addi $s0,$t0,0x1234
    bne $s0,$s2,BAD_TRAP

    li $t0, 0x12345678
    li $t1, 0x02345678
    li $s2, 0x10000000
    sub $s0,$t0,$t1
    bne $s0,$s2,BAD_TRAP

    

    HIT_GOOD_TRAP
BAD_TRAP:
    HIT_GOOD_TRAP
